package com.gray.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gray.dao.UserCommentDao;
import com.gray.pojo.UserComment;
import com.gray.service.IUserCommentService;

@Service
public class UserCommentService implements IUserCommentService {
	
	@Autowired
	private UserCommentDao userCommentDao;
	
	
	
	@Override
	public List getUserCommentByArticleId(short articleId) {
		List list = this.userCommentDao.selectUserCommmentByArticleId(articleId);
		
		return list;
	}



	@Override
	public int commitComment(UserComment userComment) {
		
		return this.userCommentDao.insertUserCommitSelective(userComment);
	}



	@Override
	public int updatePraise(UserComment userComment) {
		return this.userCommentDao.updatePraise(userComment);
	}

}
